<template>
   <div style="height: 150px;margin-bottom:10px">
      <el-table
        ref="tblMain"
        style="margin-top: 20px"
        :data="listData"
        height="100%"
        v-loading.body="loading"
        border
        stripe
      >
        <el-table-column
          type="index"
          width="50"
          label="序号"
          align="center"
        ></el-table-column>
        <el-table-column prop="handoverContent" label="交接内容" align="center">
          <template slot-scope="scope">
            <span >{{ scope.row.handoverContent }}</span>
          </template>
        </el-table-column>
        <el-table-column
          prop="handoverState"
          label="是否完成"
          align="center"
        >
        <template slot-scope="scope">
          <span >{{ scope.row.handoverState == '1'?'是':'否' }}</span>
          </template>
        </el-table-column>
        <el-table-column
          prop="handoverDesc"
          label="交接描述"
          align="center"
        >
        <template slot-scope="scope">
          <span >{{ scope.row.handoverDesc }}</span>
        </template>
        </el-table-column>
      </el-table>
    </div>
</template>
<script>
import {
  getStrHodListByApplyId,
} from '@/api/businessCo'
export default {
  name: 'applyMain',
  props: {
    rowData:{
      type: Object,
      default: {}
    },
    stateList: {
      type: Array,
      default: []
    }
  },
  data() {
    return {
      loading: false,
      listData: [],
    }
  },
  created() {},
  mounted() {
    this.getStrHodListByApplyId()
  },
  methods: {
    /**
     * 获取列表信息
     */
    getStrHodListByApplyId() {
      let data={
        applyId:this.rowData.id
      }
      getStrHodListByApplyId(data).then(res=>{
        const { code = undefined, data = {} } = res.data
        if (!code) {
          this.loading = false
          this.listData = data;
        } else {
          this.$message.error(data)
        }
        }).catch(() => {
          this.$message.error('服务器繁忙')
          this.loading = false
        })
    },
  }
}
</script>
